<?php 
header("Content-type:text/html;charset=utf-8");
date_default_timezone_set('PRC');
include_once("./excel/1.php"); 
include_once("./Db_pdo.class.php");
//$DB=new Db_pdo("jmshop","root","root");
//$DB=new Db_pdo("jmft_cxh","root","123456"); 
$DB=new Db_pdo("cxh_v3","cxhv3","cxhv3pwd!@#");
set_time_limit(0);
echo '<pre>';
//  更新特定用户的 升级

// $sql = 'SELECT
// id
// FROM
// ims_ewei_shop_member
// WHERE
// createtime > 1553727618
// ';
//  $data= $DB->new_query($sql);
// $data = $data->fetchAll(PDO::FETCH_ASSOC); 

// foreach($data as $value){
//     $sql1 = "update ims_cxh_user_ex set uex_level=2 where member_id=".$value['id'];
//     echo $sql1;
//      $DB->new_query($sql1);
// }
// print_r($data);

//更新二组特定用户 

// $sqls ="SELECT
// a.realname,
// a.openid,
// a.level,
// b.*
// FROM
// ims_ewei_shop_member AS a
// INNER JOIN ims_cxh_user_ex AS b ON a.id = b.member_id
// WHERE
// a.cxhname like '%cxh687652%'";
//  $data= $DB->new_query($sqls);
// $data = $data->fetchAll(PDO::FETCH_ASSOC); 



// $sqls1 ="UPDATE ims_ewei_shop_member set level=2  WHERE id=".$data['0']['member_id'];
// // echo $sqls1;
// $DB->new_query($sqls1);
 
// $t=",1,".$data['0']['member_id'].",";
// $sqls2 = "UPDATE ims_cxh_user_ex set uex_level =2,uex_parentID=1,uex_parentAccount='DLS111111',uex_parentList='$t' WHERE member_id =".$data['0']['member_id'];
// $DB->new_query($sqls2);
// echo $sqls2;


